const install = (Vue, vm) => {
	/* 1.0 轮播图 */
	const getSwiperAPI = () => vm.$u.get('home/swiperdata')
	/* 2.0 导航 */
	const getCatItemsAPI = () => vm.$u.get('home/catitems')
	/* 3.0 首页图 */
	const getFloorDataAPI = () => vm.$u.get('home/floordata')

	/* 4.0 搜索 */
	const getSearchListAPI = (params = {}) => vm.$u.get('goods/qsearch', params)

	/* 5.0 分类数据 */
	const getCategoriesAPI = () => vm.$u.get('/categories')

	/* 6.0 商品列表 */
	const getGoodsListAPI = (params = {}) => vm.$u.get('/goods/search', params)

	/* 7.0 商品详情 */
	const getGoodsDetailAPI = id => vm.$u.get('/goods/detail', { goods_id: id })

	vm.$u.api = {
		getSwiperAPI,
		getCatItemsAPI,
		getFloorDataAPI,
		getSearchListAPI,
		getCategoriesAPI,
		getGoodsListAPI, getGoodsDetailAPI
	}
}

export default {
	install
}
